package com.lcf.system.controller;

import com.lcf.system.dto.email.EmailDTO;
import com.lcf.system.service.EmailService;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import jakarta.annotation.Resource;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * 邮件
 *
 * @author lcf
 */
@Tag(name = "邮件")
@RequestMapping("/email")
@RestController
public class EmailController {
    @Resource
    private EmailService emailService;

    /**
     * 发送绑定邮箱验证码
     */
    @Operation(summary = "发送绑定邮箱验证码")
    @PostMapping("sendBindEmailCode")
    public void sendBindEmail(@Validated EmailDTO email) {
        emailService.sendBindEmail(email);
    }
}
